Contextual similarity is way of measuring the similarity of two documents. Contextual similarity measures whether two documents have the same words in the same place (e.g., context). This is different from a semantic similarity measurement system, which measures the similarity in the meaning between two documents.
Because contextual similarity measures whether the same words are in the same place in documents, contextual similarity measurement system can treat two documents as being dissimilar even though these documents are semantically similar. These systems tend to rely on the precise ordering and spelling of the words in the documents to provide these results. For example, the two semantically identical sentences “The ball is green” and “It's a green ball” only share two words and the order of the two words is different between the two. Thus, the contextual similarity of these two sentences is quite low. It would be useful to preprocess documents for a contextual similarity measurement system.